
<!DOCTYPE html>
<html lang="en" class="loading">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>pycharm安装及配置 - fubaisen</title>
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <meta name="google" content="notranslate" />
    <meta name="keywords" content="Fechin,"> 
    <meta name="description" content="有两个版本：  professional专业版     Community 社区版
ubuntu安装pycharm专业版1.下载安装在官网下载安装包https://www.jetbrains.com,"> 
    <meta name="author" content="John Doe"> 
    <link rel="alternative" href="atom.xml" title="fubaisen" type="application/atom+xml"> 
    <link rel="icon" href="/img/favicon.png"> 
    
    
    
    <meta name="twitter:card" content="summary"/>
    <meta name="twitter:title" content="pycharm安装及配置 - fubaisen"/>
    <meta name="twitter:description" content="有两个版本：  professional专业版     Community 社区版
ubuntu安装pycharm专业版1.下载安装在官网下载安装包https://www.jetbrains.com,"/>
    
    
    
    
    <meta property="og:site_name" content="fubaisen"/>
    <meta property="og:type" content="object"/>
    <meta property="og:title" content="pycharm安装及配置 - fubaisen"/>
    <meta property="og:description" content="有两个版本：  professional专业版     Community 社区版
ubuntu安装pycharm专业版1.下载安装在官网下载安装包https://www.jetbrains.com,"/>
    
<link rel="stylesheet" href="/css/diaspora.css">

    <script>window.searchDbPath = "/search.xml";</script>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap" rel="stylesheet">
<meta name="generator" content="Hexo 6.3.0"></head>

<body class="loading">
    <span id="config-title" style="display:none">fubaisen</span>
    <div id="loader"></div>
    <div id="single">
    <div id="top" style="display: block;">
    <div class="bar" style="width: 0;"></div>
    <a class="iconfont icon-home image-icon" href="javascript:;" data-url="http://fubaisen.github.io"></a>
    <div title="播放/暂停" class="iconfont icon-play"></div>
    <h3 class="subtitle">pycharm安装及配置</h3>
    <div class="social">
        <div>
            <div class="share">
                <a title="获取二维码" class="iconfont icon-scan" href="javascript:;"></a>
            </div>
            <div id="qr"></div>
        </div>
    </div>
    <div class="scrollbar"></div>
</div>

    <div class="section">
        <div class="article">
    <div class='main'>
        <h1 class="title">pycharm安装及配置</h1>
        <div class="stuff">
            <span>一月 10, 2022</span>
            
  <ul class="post-tags-list" itemprop="keywords"><li class="post-tags-list-item"><a class="post-tags-list-link" href="/tags/%E8%BD%AF%E4%BB%B6/" rel="tag">软件</a></li></ul>


        </div>
        <div class="content markdown">
            <p>有两个版本：  professional专业版     Community 社区版</p>
<h2 id="ubuntu安装pycharm专业版"><a href="#ubuntu安装pycharm专业版" class="headerlink" title="ubuntu安装pycharm专业版"></a>ubuntu安装pycharm专业版</h2><h5 id="1-下载安装"><a href="#1-下载安装" class="headerlink" title="1.下载安装"></a>1.下载安装</h5><p>在官网下载安装包<a target="_blank" rel="noopener" href="https://www.jetbrains.com/pycharm/download/#section=linux">https://www.jetbrains.com/pycharm/download/#section=linux</a></p>
<p>解压安装包</p>
<p><code>tar -zxvf pycharm-professional-2020.1.tar.gz</code> </p>
<p>新建目录 安放解压文件</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">sudo mkdir /opt/pycharm</span><br><span class="line">sudo mv pycharm-2020.1/ /opt/pycharm/</span><br><span class="line">cd /opt/pycharm/</span><br><span class="line">ls</span><br></pre></td></tr></table></figure>

<p>​		&#x2F;opt ：给主机额外安装软件所摆放的目录</p>
<p>​		显示</p>
<p>​			<img src="https://s2.loli.net/2023/03/15/UQGCXVtw79WRTPO.png" alt="image-20211201120209272" style="zoom:50%;" /></p>
<p>​		则安装完毕</p>
<h5 id="2-启动和配置-Pycharm"><a href="#2-启动和配置-Pycharm" class="headerlink" title="2.启动和配置 Pycharm"></a>2.启动和配置 Pycharm</h5><h6 id="1）-启动Pycharm"><a href="#1）-启动Pycharm" class="headerlink" title="1）.启动Pycharm"></a>1）.启动Pycharm</h6><p><code>sh /opt/pycharm/pycharm-2020.1/bin/pycharm.sh</code></p>
<h6 id="2-稍后会弹出一个窗口，选择同意，然后Continue"><a href="#2-稍后会弹出一个窗口，选择同意，然后Continue" class="headerlink" title="2).稍后会弹出一个窗口，选择同意，然后Continue"></a>2).稍后会弹出一个窗口，选择同意，然后Continue</h6><p><img src="https://s2.loli.net/2023/03/15/xwahZkuRldt6vTP.png" alt="image-20211201120413238"></p>
<h6 id="3-、激活pycharm"><a href="#3-、激活pycharm" class="headerlink" title="3)、激活pycharm"></a>3)、激活pycharm</h6><p>​		选择中间的Activation code</p>
<pre><code>     将激活码粘进去，确定就好了
</code></pre>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">链接：https://pan.baidu.com/s/16kgyipATPndapfyCtCuOfg </span><br><span class="line">提取码：0000 </span><br><span class="line">--来自百度网盘超级会员V1的分享</span><br></pre></td></tr></table></figure>

<h6 id="4-选择可用命令行启动Pycharm"><a href="#4-选择可用命令行启动Pycharm" class="headerlink" title="4).选择可用命令行启动Pycharm"></a>4).选择可用命令行启动Pycharm</h6><p>也就是以后可以在终端中直接输入<code>pycharm</code>，回车后就启动 Pycharm</p>
<p><img src="https://s2.loli.net/2023/03/15/TSKXLc1ow7vbFnf.jpg" alt="4c8kcyeak6"></p>
<blockquote>
<p>5).可选择安装一些插件</p>
<p>这个看个人需要，我就没有选择；如果以后需要，也可以在IDE中安装的</p>
<p><img src="https://s2.loli.net/2023/03/15/g9St2rc5ojKhbTq.jpg" alt="nni5dgndkt"></p>
</blockquote>
<h6 id="6-我们先不用着急进入，可以在这里设置桌面图标，这方便我们打开Pycharm，比命令行好使"><a href="#6-我们先不用着急进入，可以在这里设置桌面图标，这方便我们打开Pycharm，比命令行好使" class="headerlink" title="6).我们先不用着急进入，可以在这里设置桌面图标，这方便我们打开Pycharm，比命令行好使"></a>6).我们先不用着急进入，可以在这里设置桌面图标，这方便我们打开Pycharm，比命令行好使</h6><p><img src="https://s2.loli.net/2023/03/15/aWtjfAQR37cvEGZ.jpg" alt="9699xy7hls"></p>
<p><img src="https://s2.loli.net/2023/03/15/BnlcCZufdtbT58W.jpg" alt="au3kv5zc34"></p>
<blockquote>
<p>——若错过  则</p>
<p>在桌面上创建pycharm快捷方式</p>
<p><code>sudo gedit /usr/share/applications/pycharm.desktop</code></p>
<p>复制粘贴下面文字  若路径不同自主更改</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">[Desktop Entry]</span><br><span class="line">Version=1.0</span><br><span class="line">Type=Application</span><br><span class="line">Name=Pycharm</span><br><span class="line">Icon=/opt/pycharm/pycharm-2021.2.3/bin/pycharm.png</span><br><span class="line">Exec=sh /opt/pycharm/pycharm-2021.2.3/bin/pycharm.sh</span><br><span class="line">MimeType=application/x-py;</span><br><span class="line">Name[en_US]=pycharm</span><br></pre></td></tr></table></figure>
</blockquote>
<h2 id="——配置-Python-环境"><a href="#——配置-Python-环境" class="headerlink" title="——配置 Python 环境"></a>——<strong>配置 Python 环境</strong></h2><p>如果现在着急打开Pycharm新建工程的话，可能会创建失败，会报错， 比如“错误提示：ModuleNotFoundError: No module named ‘distutils.util’ ”，这明显是因为没有安装一些模块。我们先来安装一些常见的东东：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">erry@jerry-virtual-machine:~/Desktop$ sudo apt install python3-pip</span><br><span class="line">jerry@jerry-virtual-machine:~/Desktop$ sudo apt-get install python3-distutils</span><br></pre></td></tr></table></figure>

<h2 id="新建工程"><a href="#新建工程" class="headerlink" title="新建工程"></a><strong>新建工程</strong></h2><p>配置完成，界面如下</p>
<p><img src="https://s2.loli.net/2023/03/15/R4zuZhPECm3M2OL.png" alt="img"></p>
<h6 id="1-创建项目"><a href="#1-创建项目" class="headerlink" title="1.创建项目"></a>1.创建项目</h6><p>创建 Python 项目</p>
<p>这里选择New Project</p>
<p><img src="https://s2.loli.net/2023/03/15/shUrlPJmIj4VRdX.png" alt="img"></p>
<ol start="2">
<li>设置项目名称和选择解释器（即python.exe）</li>
</ol>
<p>如果出现 No Python interpreter selected 表示 Python 的环境变量有问题。这里我们使用自己的解释器</p>
<p>注意：这里默认使用的 Python 的虚拟环境，如果你不使用虚拟环境，一定要修改。</p>
<p><img src="https://s2.loli.net/2023/03/15/CXFb9hlxoGBZkgf.png" alt="img"></p>
<p> 3.选择系统解释器，找到你安装的 Python 目录，点击OK</p>
<p><img src="https://s2.loli.net/2023/03/15/aTlBuCj5LGrqkH3.png" alt="img"></p>
<p> 然后点击 Create 即可</p>
<p><img src="https://s2.loli.net/2023/03/15/duQGKpZ1aFeo2iA.png" alt="img"></p>
<p>4.那么现在项目就创建成功了，去掉 Show tips on startup，不用每次都打开欢迎界面，然后关闭即可。</p>
<p><img src="https://s2.loli.net/2023/03/15/LbxonJ2WMEdg5v6.png" alt="img"></p>
<p> 5.测试运行</p>
<p>Python 文件</p>
<p>刚才我们创建项目的时候，默认勾选了Create a main.py welcome script，PyCharm默认会帮我们创建main.py文件，键盘输入Shift+F10，即可运行</p>
<p><img src="https://s2.loli.net/2023/03/15/dBOfQm6U5Klhwbs.png" alt="img"></p>
<p> 输出结果</p>
<p><img src="https://gitee.com/lichaikui/picture/raw/master/tupian/2376234-20210620111109748-573228000.png" alt="img"></p>
<h2 id="优化-Pycharm"><a href="#优化-Pycharm" class="headerlink" title="优化 Pycharm"></a><strong>优化 Pycharm</strong></h2><h6 id="1-配置字体"><a href="#1-配置字体" class="headerlink" title="1.配置字体"></a>1.配置字体</h6><p><img src="https://s2.loli.net/2023/03/15/58Ji4ZAhFXtxzvf.jpg" alt="jn02g6t2g9"></p>
<h6 id="2-安装插件"><a href="#2-安装插件" class="headerlink" title="2.安装插件"></a>2.安装插件</h6><p>我们在安装 Pycharm 时，有个界面是选择要安装的插件。其实，我们可以自已来安装，打开路径是：file —  settings —  plugings</p>
<p><img src="https://s2.loli.net/2023/03/15/ivnqoemXcfrzG2P.jpg" alt="b3uzh3ilpg">安装插件十分简单，如安装 statistic:	</p>
<p>​	<img src="https://s2.loli.net/2023/03/15/nla4eUWdgQ8cIYm.jpg" alt="o6ehl4o7xu" style="zoom:80%;" /></p>
<p>合适的插件，会让 Pycharm 如虎添翼。关于插件的内容，这里就不具体展开了，只是罗列一些大神推荐的插件：</p>
<p>（1）statistic： 项目统计 </p>
<p>（2）Rainbow Brackets：让代码块之间很清晰的显示出各种颜色 </p>
<p>（3）.ignore：使用git的人知道，也就是.gitignore</p>
<p><strong><img src="https://gitee.com/lichaikui/picture/raw/master/tupian/70-163842497552167.png" alt="这里写图片描述"></strong></p>
<h2 id="汉化pycharm"><a href="#汉化pycharm" class="headerlink" title="汉化pycharm"></a>汉化pycharm</h2><h6 id="方法一："><a href="#方法一：" class="headerlink" title="方法一："></a>方法一：</h6><p>打开pycharm<br>点击 Edit—&gt;&gt;&gt;Settings<img src="https://s2.loli.net/2023/03/15/Q1X8wmU5MNldc6G.png" alt="0726871d7ae4bcd7f7cff04dffed06a5"></p>
<p>然后点击 Plugins—&gt;&gt;&gt;Marketplace<br>找到Chinese（simplified）Language，再点击Install<br><img src="https://s2.loli.net/2023/03/15/TNwksW3QvjLybaI.png" alt="a96fae32e94d98dd260953c94319cd14"></p>
<p>系统会提示重启，我们重启即可</p>
<h6 id="方法二："><a href="#方法二：" class="headerlink" title="方法二："></a>方法二：</h6><p>如果搜不到呢，像下面这样 Nothing，found，也没有关系，我们还有第二种方法，我们手动安装<img src="https://s2.loli.net/2023/03/15/sQFGcDh15fLYSE9.png" alt="f85ee0a86fe240822151252065612818"></p>
<p>去这个PyCharm官方Marketplace，经验心得，pycharm搜不到的，你来这<br>PyCharm官方Marketplace链接：<a target="_blank" rel="noopener" href="https://plugins.jetbrains.com/">https://plugins.jetbrains.com/</a>.</p>
<p>这个就是PyCharm中文语言包的直达链接<br>链接: Chinese (Simplified) Language Pack &#x2F; 中文语言包.</p>
<p>点击链接直达，如果此时你的pycharm没有打开，那么我们就点击Get，然后找到与你pycharm版本对应的语言包下载即可（一定要与自己的pycharm版本一致）<img src="https://s2.loli.net/2023/03/15/AuXr5pyZYUWcLdv.png" alt="90c79ea3b9970466dce119cacf300b92"></p>
<p>如果此时你pycharm正在打开，那么可能就是这样，不用你自己选择版本，会直接自动匹配与你pycharm版本一致的中文语言包</p>
<p><img src="https://s2.loli.net/2023/03/15/4fFMxGTgYrnicuq.png" alt="e7731bee9af4e3eb14952cd944c870f0"></p>
<p>我们直接暴力点击 Install 即可</p>
<h1 id="widows安装pycharm"><a href="#widows安装pycharm" class="headerlink" title="widows安装pycharm"></a>widows安装pycharm</h1><p><img src="https://s2.loli.net/2023/03/15/AL6W37joEPINvnr.png" alt="feb86f41cddb277e4a38d1525ae055c"></p>
<p><img src="https://s2.loli.net/2023/03/15/bYurjdE2qtZaRv4.png" alt="d8fd0dfe1a1acbad45022a9f041fa58"></p>
<p><img src="https://s2.loli.net/2023/03/15/uIsSklhg3jLr26J.png" alt="img"></p>
<p>安装成功后我们打开使用一下：</p>
<p>选择第二个</p>
<p><img src="https://s2.loli.net/2023/03/15/UPhZcVfqRSGzKdi.png" alt="img"></p>
<h1 id="激活pycharm"><a href="#激活pycharm" class="headerlink" title="激活pycharm"></a>激活pycharm</h1><p>1.修改hosts文件：</p>
<ul>
<li><p>在系统C盘中找到   <strong>hosts文件</strong>  </p>
</li>
<li><p>一般   windwos系统hosts文件 路径为：<strong>C:\Windows\System32\drivers\etc</strong></p>
</li>
<li><p>将hosts文件   <strong>复制   到另一个地方</strong>， 不要直接修改    添加下面一行到hosts文件，目的是屏蔽掉Pycharm对激活码的验证：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">0.0.0.0 account. jetbrains. com</span><br></pre></td></tr></table></figure></li>
</ul>
<p>​			    将这一行<strong>复制到该文件的最下面一行</strong>即可，保存，然后将修改后的文件复				制粘贴<strong>替换原hosts文件</strong>。 覆盖原来的即可</p>
<ul>
<li><p>打开PyCharm，选择 Activate code（用激活码激活）</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">链接：https://pan.baidu.com/s/16kgyipATPndapfyCtCuOfg </span><br><span class="line">提取码：0000 </span><br><span class="line">--来自百度网盘超级会员V1的分享</span><br></pre></td></tr></table></figure>
</li>
<li><p>在复制下载激活码，填入激活码框 点击 OK 进行认证</p>
</li>
</ul>
<p>2.看下一篇</p>

            <!--[if lt IE 9]><script>document.createElement('audio');</script><![endif]-->
            <audio id="audio" loop="1" preload="auto" controls="controls" data-autoplay="false">
                <source type="audio/mpeg" src="">
            </audio>
            
                <ul id="audio-list" style="display:none">
                    
                        
                            <li title="0" data-url="http://link.hhtjim.com/163/425570952.mp3"></li>
                        
                    
                        
                            <li title="1" data-url="http://link.hhtjim.com/163/425570952.mp3"></li>
                        
                    
                </ul>
            
        </div>
        
        
    <div id="gitalk-container" class="comment link"
		data-enable="false"
        data-ae="false"
        data-ci=""
        data-cs=""
        data-r=""
        data-o=""
        data-a=""
        data-d="false"
    >查看评论</div>


    </div>
    
</div>


    </div>
</div>
</body>


<script src="//lib.baomitu.com/jquery/1.8.3/jquery.min.js"></script>
<script src="/js/plugin.js"></script>
<script src="/js/typed.js"></script>
<script src="/js/diaspora.js"></script>


<link rel="stylesheet" href="/photoswipe/photoswipe.css">
<link rel="stylesheet" href="/photoswipe/default-skin/default-skin.css">


<script src="/photoswipe/photoswipe.min.js"></script>
<script src="/photoswipe/photoswipe-ui-default.min.js"></script>


<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
    <!-- Background of PhotoSwipe. 
         It's a separate element as animating opacity is faster than rgba(). -->
    <div class="pswp__bg"></div>
    <!-- Slides wrapper with overflow:hidden. -->
    <div class="pswp__scroll-wrap">
        <!-- Container that holds slides. 
            PhotoSwipe keeps only 3 of them in the DOM to save memory.
            Don't modify these 3 pswp__item elements, data is added later on. -->
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>
        <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
        <div class="pswp__ui pswp__ui--hidden">
            <div class="pswp__top-bar">
                <!--  Controls are self-explanatory. Order can be changed. -->
                <div class="pswp__counter"></div>
                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
                <button class="pswp__button pswp__button--share" title="Share"></button>
                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
                <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                <!-- element will get class pswp__preloader--active when preloader is running -->
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                      <div class="pswp__preloader__cut">
                        <div class="pswp__preloader__donut"></div>
                      </div>
                    </div>
                </div>
            </div>
            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div> 
            </div>
            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>
            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>
            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>
        </div>
    </div>
</div>






</html>
